IAxis.Cam method
Links the axes and starts to cam. The number of slaves is up to 32.
Namespace: IntervalZero.KINGSTAR.Base.Class
Assembly: IntervalZero.KINGSTAR.Base.Class (in IntervalZero.KINGSTAR.Base.dll) Version: 4.4.0.0
Syntax
ICamCommand Cam(
IAxis master,
ICamTable table,
bool permanent,
double masterOffset,
double slaveOffset,
double masterScaling,
double slaveScaling,
McCamStartMode startMode,
double startParameter,
McSource masterValueSource,
McBufferMode bufferMode
)
Function Cam(
master As IAxis,
table As ICamTable,
permanent As Boolean,
masterOffset As Double,
slaveOffset As Double,
masterScaling As Double,
slaveScaling As Double,
startMode As McCamStartMode,
startParameter as Double,
masterValueSource As McSource,
bufferMode As McBufferMode
) As ICamCommand
Parameters
master
Type: IAxis
The reference to the master axis.
table
Type: ICamTable
Defines the cam table.
permanent
Type: bool
Determines whether the cam state is preserved after the motor is disabled.
true: The cam state is preserved even if the motor is disabled. For example, if the master axis is enabled, the slave axis will be enabled. If an error has occurred on the master, it occurred on the slave too.
false: The cam state won't be preserved after the motor is disabled.
masterOffset
Type: double
The offset to the positions of the master axis in the cam table.
slaveOffset
Type: double
The offset to the positions of the slave axis in the cam table.
masterScaling
Type: double
The factor for the master profile (default = 1.0). From the slave point of view the overall master profile is multiplied by this factor.
slaveScaling
Type: double
The factor for the slave profile (default = 1.0). The overall slave profile is multiplied by this factor.
startMode
Type: McCamStartMode
The cam mode your axes use.
startParameter
Type: double
Depends on the start ramp you choose. If it is camRampDistance
, startParameter is the distance the slave moves. The unit is count. If it is camRampTime
, startParameter is the time the slaves takes to move. The unit is second. This parameter uses the master's information to determine how to move the slave. The distance is based on how far the master moves.
masterValueSource
Type: McSource
Defines the source for synchronization.
- mcSetValue – synchronization on master set value. We suggest you use these settings.
- mcActualValue – synchronization on master actual value. This setting may not be stable.
- mcSecondEncoderValue – actual value of the secondary encoder of the axis.
NOTE: mcSecondEncoderValue is not supported yet.
bufferMode
Type: McBufferMode
Defines how to blend the velocity of two methods.
Return value
Type: ICamCommand
Returns the properties of a cam move.
Remarks
- For more information about how a cam works, see Concepts > How to use cam in KINGSTAR.
- It is not required that the master is stationary.
- If the actual master and slave positions do not correspond to the offset values when Cam is run, either an error occurs or the system deals with the difference automatically.
- This method is not merged with the ICamTable.SetTable, because this separation enables changes on the fly.
- A mechanical analogy to a slave offset is a cam welded with additional constant layer thickness. Because of this, the slave positions have a constant offset and the offset can be interpreted as axis offset of the master shaft, if linear guided slave tappets are assumed.
See also